<!--  基本信息 -->
<template>
	<uni-card spacing="0" padding="0" :is-shadow="false" :border="false">
		<view class="details-dom">
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">姓名</view>
				<view class="content">{{detailsData.name}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">联系电话</view>
				<view class="content">{{detailsData.phone}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">联系邮箱</view>
				<view class="content">{{detailsData.email}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">工作单位</view>
				<view class="content">{{detailsData.workUnit}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">工作岗位</view>
				<view class="content">{{detailsData.workPosition}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">擅长领域</view>
				<view class="content">{{detailsData.skilledField}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">技能证书</view>
				<view class="content">{{detailsData.skillsCertificate}}</view>
			</view>
			<view class="flex-row flex-row-space-between item-dom">
				<view class="title">个人简介</view>
				<view class="content">{{detailsData.personalProfile}}</view>
			</view>
			
		</view>
	</uni-card>
</template>

<script lang="ts" setup>
	import { Expert } from "@/api/tables/Expert"
	import { getUser } from "@/utils/storage"
	import { expertDetail } from "@/api/consult"
	import { ref, onBeforeMount } from 'vue'

	let userData = getUser()
	let detailsData = ref<Expert>({})
	onBeforeMount(() => {
		getDetail(userData.userId)
	})
	function getDetail(id) {
		expertDetail({ id }).then(res => {
			if (res.code == '200') {
				detailsData.value = res.data
			}
		})
	}
</script>

<style lang="scss" scoped>

</style>